#!/usr/bin/sh

set -e

cd /usr/local/bin
unzip -q allure-2.15.0.zip
export PATH="$PATH:/usr/local/bin/allure-2.15.0/bin"

allure_report_path=${JM_SHARE_DIR}/allure-report
allure generate ${JIANMU_ALLURE_RESULTS_PATH} -o ${allure_report_path}
ls -l ${allure_report_path}

echo 'resultFile:'
echo "{\"allure_report_path\": \"${allure_report_path}\"}" > /usr/result_file
cat /usr/result_file

